<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class SignRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'team_id'    => 'required',
            'sign_coord' => 'required',
            'sign_desc'  => 'required',
            'sign_pics'  => 'required'
        ];
    }

    public function messages()
    {
        return [
            'team_id.required'    => '未选择队伍',
            'sign_coord.required' => '标记坐标为空',
            'sign_desc.required'  => '标记描述为空',
            'sign_pics.required'  => '请上传标记图片',
        ];
    }
}
